Database Management System
Q71.
Consider a database that has the relation schema CR (StudentName, CourseName). An instance of the schema CR is as given below. The following query is made on the database T1\leftarrow \pi _{CourseName}(\sigma _{StudentName='SA'}(CR)) T2\leftarrow CR\div T1 The number of rows in T2 is ____________.Q72.
Consider the join of a relation R with a relation S. If R has m tuples and S has n tuples then the maximum and minimum sizes of the join respectively areQ73.
Consider a join (relation algebra) between relations r(R)and s(S) using the nested loop method. There are 3 buffers each of size equal to disk block size, out of which one buffer is reserved for intermediate results. Assuming size(r(R))\ltsize(s(S)), the join will have fewer number of disk block accesses ifQ74.
Consider two relations R1(A,B) with the tuples (1,5), (3,7) and R2(A,C) = (1,7), (4,9). Assume that R(A,B,C) is the full natural outer join of R1 and R2. Consider the following tuples of the form (A,B,C): a = (1,5,null), b = (1,null,7), c = (3, null, 9), d = (4,7,null), e = (1,5,7), f = (3,7,null), g = (4,null,9). Which one of the following statements is correct?Q75.
Given the relations employee (name, salary, dept-no), and department (dept-no, dept-name,address), Which of the following queries cannot be expressed using the basic relational algebra operations \left(\sigma, \pi,\times ,\Join, \cup, \cap,-\right)?Q76.
Suppose R1(A, B) and R2(C, D) are two relation schemas. Let r1 and r2 be the corresponding relation instances. B is a foreign key that refers to C in R2. If data in r1 and r2 satisfy referential integrity constraints, which of the following is ALWAYS TRUE?Q77.
Consider the following relations A, B and C: How many tuples does the result of the following relational algebra expression contain? Assume that the schema of A\cupB is the same as that of A. (A\cup B)\bowtie _{A.Id \gt 40 \vee C.Id \lt 15}CQ78.
Consider the relational schema given below, where eId of the relation dependentis a foreign key referring to empId of the relation employee. Assume that every employee has at least one associated dependent in the dependent relation. The above query evaluates to the set of empIds of employees whose age is greater than that ofQ79.
Let R and S be two relations with the following schema R (\underline{P},\underline{Q},R1,R2,R3) S (\underline{P},\underline{Q},S1,S2) Where {P, Q} is the key for both schemas. Which of the following queries are equivalent? I. \Pi _{P}(R\Join S) II. \Pi _{p}(R)\Join \Pi _{P}(S) III. \Pi _{P}(\Pi _{P,Q}(R)\cap \Pi _{P,Q}(S)) IV. \Pi _{P}(\Pi _{P,Q}(R)-(\Pi _{P,Q}(R)-\Pi _{P,Q}(S)))Q80.
Consider a relational table r with sufficient number of records, having attributes A_{1}, A_{2},..., A_{n} and let 1\leq p\leq n . Two queries Q1 and Q2 are given below. Q1:\pi _{A_{1}....A_{n}}(\sigma _{A_{p}=c}(r)) where c is a constant Q2:\pi _{A1....A_{n}}(\sigma _{c_{1}\leq A_{p}\leq c_{2}}(r)) where c_{1} and c_{2} are constants The database can be configured to do ordered indexing on A_{p} or hashing on A_{p}. Which of the following statements is TRUE?